package com.gupao.springbootmybatis.dao;


import com.gupao.springbootmybatis.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface UserMapper {

    /**
     * 批量 动态新增用户
     * @param tableName
     * @param users
     * @return
     */
    int batchAddUser(@Param("tableName")String tableName, @Param("list")List<User> users);

    List<User> selectAll(@Param("status") Integer status);

    User find(String username);
    List<User> list();
    int insert(User user);
    int delete(int id);
    int update(User user);
}
